package com.spring.xiatian.order.service.impl;

import com.spring.xiatian.order.dao.OrderRepository;
import com.spring.xiatian.order.entity.UserOrder;
import com.spring.xiatian.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Created by xiaoxia on 2017/10/30 0030 13:37.
 */
@Service
public class OrderServiceImpl implements OrderService{

    @Autowired
    OrderRepository orderRepository;

    @Override
    public UserOrder queryOrderById(Long id) {
        return orderRepository.queryOrderById(id);
    }

    @Override
    public List<UserOrder> getList() {
        return orderRepository.findAll();
    }

}
